import storage from '@/utils/storage';
import { legacy_createStore as createStore } from 'redux';
import reducer from './reducer';

// 利用store来保存状态（state）
const store = createStore(reducer);
store.subscribe(() => {
    const address = store.getState().walletAddress
    console.log('sotre', address);

    storage.localSet('address', address)
});

export default store;